<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends ParentController {
    public function index(){
    	$user = M('user')->where("username='%s'",session('username'))->find();
    	session('is_admin',(int)$user['is_admin']);
    	cookie('nicename',$user['username']);
    	cookie('created_at',$user['created_at']);
    	cookie('identity',$user['identity']);
        $this->redirect('/Home/Shuadan/index','',0);
    }
}